<template>
	<view :style="objColor">
		<view class="list_831">
			<view :class="[item.now ? 'active' : '', 'item_view']" v-for="(item,index) in itemData" :key="index">
				<view class="time_view">{{item.currentStartTime}}-{{item.currentEndTime}}</view>
				<view class="current_icon" v-if="item.now">当前价</view>


				<view>
					<view class="right_item">
						<!-- 先看是否有专享价,有的话不显示别的价格 -->
						<view class="price_view zxj_view" v-if="item.exclusiveDiscount">
							<!-- 专享价 -->
							<view class="line_view">
								<view class="img_view">
									<image class="v_icon"
										src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/small/zxj.png"
										mode="scaleToFill" />
								</view>
								<view class="text_view">
									<text class="current_t1">{{item.exclusivePriceStr}}</text>
									<text v-if="!isDisCharge">{{item.exclusivePowerPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.exclusiveServicePriceStr}}</text>
								</view>
							</view>
						</view>
						<view class="price_view" v-else>
							<!-- 大客户价展示条件 -->
							<view class="line_view"  v-if="item.contractDiscount">
								<view class="img_view">
									<image class="v_icon"
										src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/dkh_bg.png"
										mode="scaleToFill" />
								</view>
								<view class="text_view">
									<text class="current_t1">{{item.contractPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.contractPowerPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.contractServicePriceStr}}</text>
								</view>
							</view>
							<!-- 成长会员价展示 -->
							<view class="line_view"  v-if="item.growthleDiscount">
								<view class="img_view">
									<image class="v_icon"
										src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/icon-huiyuan.png"
										mode="scaleToFill" />
								</view>
								<view class="text_view">
									<text class="current_t1">{{item.growthlePriceStr}}</text>
									<text v-if="!isDisCharge">{{item.growthlePowerPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.growthleServicePriceStr}}</text>
								</view>
							</view>
							<!-- 付费会员价展示 -->
							<view class="line_view"  v-if="item.payleDiscount">
								<view class="img_view">
									<image class="v_icon"
										src="https://oos-cn.ctyunapi.cn/front-end/static/mobileImg/bgTag/icon-vip.png"
										mode="scaleToFill" />
								</view>
								<view class="text_view">
									<text class="current_t1">{{item.paylePriceStr}}</text>
									<text v-if="!isDisCharge">{{item.paylePowerPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.payleServicePriceStr}}</text>
								</view>
							</view>							
							<!-- 站点优惠 -->
							<view class="line_view zdyh" v-if="item.discount">
								<view class="img_view zdyh_icon">
									优惠价
								</view>
								<view class="text_view">
									<text class="current_t2">{{item.currentPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.currentPowerPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.currentServicePriceStr}}</text>
								</view>
							</view>							
							<!-- 原价展示 -->
							<view class="line_view yaunjia" v-if="!item.discount && !item.contractDiscount && !item.growthleDiscount && !item.payleDiscount">
								<view class="img_view"></view>
								<view class="text_view">
									<text>{{item.sweepPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.sweepPowerPriceStr}}</text>
									<text v-if="!isDisCharge">{{item.sweepServicePriceStr}}</text>
								</view>
							</view>							
							<!-- 划线价展示 -->
							<view class="line_view yaunjia" v-else>
								<view class="img_view"></view>
								<view class="text_view">
									<text class="hxj">{{item.sweepPriceStr}}</text>
									<text v-if="!isDisCharge" class="hxj">{{item.sweepPowerPriceStr}}</text>
									<text v-if="!isDisCharge" class="hxj">{{item.sweepServicePriceStr}}</text>
								</view>
							</view>														
						</view>
					</view>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		},
		props: {
			itemData: {
				type: Array,
				required: true
			},

			// 是否是放电-#V2G功能
			isDisCharge: {
				type: Boolean,
				required: false
			}
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad: function(options) {

		},
		/**
		 * 生命周期函数--监听页面初次渲染完成
		 */
		onReady: function() {},
		/**
		 * 生命周期函数--监听页面显示
		 */
		onShow: function() {
			console.log(this.itemData, 'pppppppppppppppp');
		},
		/**
		 * 生命周期函数--监听页面隐藏
		 */
		onHide: function() {},
		/**
		 * 生命周期函数--监听页面卸载
		 */
		onUnload: function() {},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh: function() {},
		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom: function() {},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {},
		methods: {

		}
	};
</script>
<style lang="less" scoped>
	// 引用公共样式
	@import url('../../commin/commin.less');
	@import url('../../commin/common.less');

	// 组件自己的样式
	@import url('./pileDetailView.less');
</style>